package com.base.service;

import com.base.model.Context;

public class GenericService extends BasicService{
	
	public void insertByRule(Context context){
		
	}
	
	public void updateByRule(Context context){
	}
	
	public void deleteByRule(Context context){
		
	}

	public void queryByRule(Context context){
		
	}

	public void opByRule(String[] types,Context context){
		for(String type : types){
			if("insert".equalsIgnoreCase(type)){
				insertByRule(context);
			}else if("update".equalsIgnoreCase(type)){
				updateByRule(context);
			}else if("delete".equalsIgnoreCase(type)){
				deleteByRule(context);
			}else if("query".equalsIgnoreCase(type)){
				queryByRule(context);
			}
		}
	}
	
	public void opByRule(Context context){
		opByRule(new String[]{"insert","update","delete","query"}, context);
	}
	
}
